@extends('admin::layouts.master')
@section('title') 审核列表 @endsection
@section('tab')
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body" style="border-bottom: none;">
                        <form class="layui-form layui-col-space5">
                            <div class="layui-input-inline layui-show-xs-block">
                                <select name="type">
                                    <option value="">请选择协议类型</option>
                                    <option value="1" @if( $arr_search['type'] == 1  ) selected="" @endif >用户端-设置-隐私政策</option>
                                    <option value="2" @if( $arr_search['type'] == 2  ) selected="" @endif >用户端-设置-用户协议</option>
									<option value="3" @if( $arr_search['type'] == 3  ) selected="" @endif >用户端-门店加盟</option>
                                    <option value="4" @if( $arr_search['type'] == 4  ) selected="" @endif >用户端-设置-关于信达</option>
                                    <option value="5" @if( $arr_search['type'] == 5  ) selected="" @endif >用户端-免责说明</option>
                                    <option value="7" @if( $arr_search['type'] == 7  ) selected="" @endif >用户端-道路救援-服务协议</option>
                                    <option value="9" @if( $arr_search['type'] == 9  ) selected="" @endif >用户端-Vip升级说明</option>
                                    <option value="6" @if( $arr_search['type'] == 6  ) selected="" @endif >商户端-设置-服务协议</option>
                                    {{--<option value="8" @if( $arr_search['type'] == 8  ) selected="" @endif >帮助中心</option>--}}
                                    <option value="10" @if( $arr_search['type'] == 10  ) selected="" @endif >小程序-免责说明</option>
                                    <option value="11" @if( $arr_search['type'] == 11  ) selected="" @endif >商户端-入驻说明</option>
                                    <option value="12" @if( $arr_search['type'] == 12  ) selected="" @endif >商户端-签订协议</option>
                                </select>
                            </div>

                            <div class="layui-input-inline layui-show-xs-block">
                            <button class="layui-btn" lay-submit="" lay-filter="sreach">
                            <i class="layui-icon">&#xe615;</i>
                            </button>
                            <button class="layui-btn" onclick="location.reload()">
                            <i class="layui-icon layui-icon-refresh"></i>
                            </button>
                            </div>
                        </form>
                    </div>
                    <div class="layui-card-body">
                        <button class="layui-btn" onclick="xadmin.open('添加协议','{{route("admin_protocol_create")}}')">
                            <i class="layui-icon"></i>添加</button>
                    </div>
                    <div class="layui-card-body layui_overflow_y ">
                        <table class="layui-table layui-form">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>类型</th>
                                <th>名称</th>
                                <th>排序</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($data as $key=>$value)
                                <tr>
                                    <td>{{ $value['id'] }}</td>
                                    <td>{{ $value['type']['name'] }}</td>
                                    <td>{{ $value['title'] }}</td>
                                    <td>{{ $value['sort'] }}</td>
                                    <td class="td-manage">
                                        <a title="编辑" class="layui-btn" onclick="xadmin.open('编辑协议','{{route("admin_protocol_edit",["id"=>$value["id"]])}}')" href="javascript:;">
                                            编辑</a>
                                        <a title="删除" class="layui-btn layui-btn-danger" data-href="{{route('admin_protocol_delete',['id'=>$value['id']])}}" data-title="确定删除用户协议吗？请谨慎操作" href="javascript:;" class="btn btn-warning ajax_member_del">
                                            删除</a>
                                    </td>
                                </tr>
                            @endforeach
                            @if(empty($data))
                                <td colspan="66" align="center">暂无数据</td>
                            @endif
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-card-body ">
                        <div class="page">
                            {{$page_link}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection


@section('tab_js')
    <script>

    </script>
@endsection




